//
//  UserAccountModel.m
//  Logistics
//
//  Created by 华谕 on 2017/11/1.
//  Copyright © 2017年 HUYU. All rights reserved.
//

#import "UserAccountModel.h"

static UserAccountModel *usermodel = nil;
@implementation UserAccountModel
+ (instancetype)shareMange
{
    //给单例加了一个线程锁
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        usermodel = [[UserAccountModel alloc] init];
    });
    return usermodel;
}

- (void)jsonUserData:(NSDictionary *)dic
{
    [usermodel setValuesForKeysWithDictionary:dic[@"data"]];
    
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"])
    {
        [self setValue:value forKey:@"ID"];
    }
}

@end
